//
//  YZEShengmingViewController.m
//  yilutongxing
//
//  Created by T&J on 2017/3/29.
//  Copyright © 2017年 YZE. All rights reserved.
//

#import "YZEShengmingViewController.h"
#import "YZEKefuViewController.h"

@interface YZEShengmingViewController ()
@property (weak, nonatomic) IBOutlet UITextView *textView;

@end

@implementation YZEShengmingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBarHidden = NO;
    self.navigationItem.title = @"声明";
    
    NSString *str=@"移路同行是由中国器官移植基金会主办的一个医疗专业产品。\r\n这个平台包含医患沟通和患者之间沟通的功能。";
    
    //self.automaticallyAdjustsScrollViewInsets = NO;
    //    textview 改变字体的行间距
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    paragraphStyle.lineSpacing = 10;// 字体的行间距
    
    NSDictionary *attributes = @{
                                 NSFontAttributeName:[UIFont systemFontOfSize:15],
                                 NSParagraphStyleAttributeName:paragraphStyle
                                 };
    self.textView.attributedText = [[NSAttributedString alloc] initWithString:str attributes:attributes];

    [[YZENetwork sharedInstace] getRequestWithUrl:[NSString stringWithFormat:@"%@%@", BASE, URL_KefuInfo] parameters:nil delegate:self requestTag:1 successBlock:^(id responseObject) {
        KefuInfoBean *bean = [KefuInfoBean mj_objectWithKeyValuesAdd:(NSArray*)responseObject[0]];
        self.textView.attributedText = [[NSAttributedString alloc] initWithString:bean.announce attributes:attributes];
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
